package com.lagou.boot;

import com.lagou.client.RPCConsumer;
import com.lagou.service.IUserService;

public class ConsumerBoot {

    //参数定义
//    private static final String PROVIDER_NAME = "UserService#sayHello#";

    public static void main(String[] args) throws InterruptedException {

        //1.创建代理对象
        RPCConsumer rpcConsumer = new RPCConsumer();
        IUserService proxy = (IUserService) rpcConsumer.createProxy(IUserService.class);

        while (true) {
            Thread.sleep(2000);
            System.out.println(proxy.sayHello("success"));
        }
    }
}
